package com.wteam.PoJo.DO;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDateTime;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author author
 * @since 2024-07-17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tb_user")
@ApiModel(value="User对象", description="用户表")
public class user implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "微信认证id")
    private String openid;

    @ApiModelProperty(value = "用户名")
    private String username;

    @ApiModelProperty(value = "简介")
    private String description;

    @ApiModelProperty(value = "头像")
    private String avatar;

    @ApiModelProperty(value = "性别，0为女，1为男")
    private Integer gender;

    @ApiModelProperty(value = "ip地址")
    private String ip;

    @ApiModelProperty(value = "积分")
    private Integer points;

    @ApiModelProperty(value = "我的粉丝数")
    private Integer fans;

    @ApiModelProperty(value = "我的关注数")
    private Integer following;

    @ApiModelProperty(value = "注册时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT,select = false)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "未读总通知数")
    private Integer unread;

    @ApiModelProperty(value = "未读点赞数")
    private Integer unreadLikes;

    @ApiModelProperty(value = "未读评论数")
    private Integer unreadReplies;

    @ApiModelProperty(value = "未读收藏数")

    private Integer unreadFavs;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT_UPDATE,select = false)
    private LocalDateTime updateTime;


}
